package com.cyx.reggie.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyx.reggie.dto.DishDto;
import com.cyx.reggie.entity.Dish;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 陈彦西
 * @date 2024/7/8 下午4:21
 */
@Service

public interface DishService extends IService<Dish> {
  //新增菜品，同时插入菜品对应的口味数据包，需要操作两张表：dish,dish_flavor
    public void saveWithFlavor(DishDto dishDto);
   //根据id查询菜品信息和对应的口味信息
    public  DishDto getByIdWithFlavor(Long id);
//更新菜品信息,同时更新对应的口味信息
    public void updateWithFlavor(DishDto dishDto);

//  public void saleWithFlavor(DishDto dishDto);

    public void deleteWithDish(List<DishDto> dishDtos);

}
